Odd errors when scripting via "Enable-Mailuser" in Powershell - "Database is Mandatory on UserMailbox"
Greetings all -I have been using powershell to mail-enable users that HR enters into AD after they are processed for employment. Basically the script is this -$Users = get-user –organizationalUnit "Contracts" ForEach($u in $users) { $mail = "SMTP:" $mail += $u.WindowsEmailAddress Enable-MailUser -Identity $u -ExternalEmailAddress $mail} This little script has done wonders for me and has processed countless users in the past.I recently got a call that we were missing users from our global address list that should have been added (The users that are created are added to different lists depending on their corresponding LDAP field being populated by HR).After investigation, I found out that upon manual operation of the script (I had it automated to run every 7 days) I was getting an error - Enable-MailUser : ExchangeGuid is mandatory on UserMailbox.At line:1 char:16+ Enable-MailUser <<<< -Identity user.name@domain.comEnable-MailUser : Database is mandatory on UserMailbox.At line:1 char:16+ Enable-MailUser <<<< -Identity user.name@domain.com After searching online, I could only find a handful of sites that even referenced this error, and even then, within the context of my question, could get no resolution. My next stop is shelling out the company credit card for some support and losing favor with the boss. Please help!FWIW, this is Exchange 2007 running on Win Server 2003 standard x64, fully patched and up to date.
April 15th, 2010 11:20pm

Hi,Can u run this command for the user for whom u r using enable-mailuser:get-recipient user.name@domain.com |FLRegards,Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
Free Windows Admin Tool Kit Click here and download it now
April 15th, 2010 11:45pm

Thanks for the quick reply - [PS] C:\>Get-Recipient user.name@domain.com | FLGet-Recipient : The operation could not be performed because object 'user.name@domain.com' could not be found on domain controller 'domain_controller.domain.com'.At line:1 char:14+ Get-Recipient <<<< user.name@domain.com | FL is what that command returns. The object in question isn't technically a 'recipient' yet though, with him still being a "user" as far as "get-user" is concerned.
April 16th, 2010 12:34am

Alephzero, I'm seeing these same error(s) using EMC on Exchange 2010 when trying to create a New Mail User (active AD account, but external SMTP address). This forum has helped me many times in the past, and I'm really hoping it will again. EMS Command Attempted: Enable -MailUser -Identity 'domain.com/OU/Display_Name' -Alias 'alias' -ExternalEmailAddress 'SMTP:email@abc.com' Errors recieved: Error: ExchangeGuid is mandatory on UserMailbox Error: Database is mandatory on UserMailbox Error: ExchangeGuid is mandatory on UserMailbox Error: Database is mandatory on UserMailbox Any help would be appreciated. Thanks! -Philip III
Free Windows Admin Tool Kit Click here and download it now
April 8th, 2011 9:15am

I cannot reproduce on 2007 or 2010, the only thing I can think of is possibly the way the AD accounts are being provisioned by HR is misclaffying the object RecipientTypeDetails. Can you fire up adsiedit and open one of the failed user and see what this attribute is set to? You can use the reference chart below. Exchange 2007 and Recipient Type Details http://blogs.technet.com/b/benw/archive/2007/04/05/exchange-2007-and-recipient-type-details.aspxJames Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
April 10th, 2011 3:21pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics